function sumSquareDifference(n) {
    return n * n * (n + 1) * (n + 1) / 4 - n * (n + 1) * (1 + 2 * n) / 6;
}

sumSquareDifference(100);